package cn.kuporo.seckill.order.domain.service;

import cn.kuporo.seckill.order.domain.model.entity.SeckillOrder;

import java.util.List;

/**
 * @author: kuporo
 * @since: 2025/7/9
 * @description: 订单领域层接口
 */
public interface SeckillOrderDomainService {

    /**
     * 保存订单
     */
    boolean saveSeckillOrder(SeckillOrder seckillOrder);

    /**
     * 根据用户id获取订单列表
     */
    List<SeckillOrder> getSeckillOrderByUserId(Long userId);

    /**
     * 根据商品id获取订单列表
     */
    List<SeckillOrder> getSeckillOrderByGoodsId(Long goodsId);

    /**
     * 以userId作为分片键删除订单
     */
    void deleteOrderShardingUserId(Long orderId, Long userId);

    /**
     * 以goodsId作为分片键删除订单
     */
    void deleteOrderShardingGoodsId(Long orderId, Long goodsId);

    /**
     * 删除订单
     */
    void deleteOrder(Long orderId);
}
